import org.qf.entity.User2;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class T2 {
    public static void main(String[] args) {
//1.加载spring的核心配置文件
        ClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext("test2.xml");
//2.获取bean 通过id属性值
        User2 user2 = (User2) context.getBean("user2");


        System.out.println(user2.getName()+"\t"+user2.getAge()+"\t"+user2.getAddress()+"\t");
    }
}